<?php
namespace Android\Controller;

use Think\Controller;

class LifeController extends Controller
{

    //好友动态
    public function life_status()
    {
        $life = D('life');
        $user = $_POST['user_id'];
        $info = $life->lifes($user);

       echo jsonFormat($info);
    }

    //发布动态
    public function add()
    {
        $life = D('life');
        $life = D('life');
        $data = $life->create();
        $success = $life->data($data)->add();
        if ($success) {
            echo "1";
        } else {
            echo "0";
        }

    }
    }